From fe8a946e876ad50ad70535ab70380c03a4eab58b Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Wed, 18 Jun 2008 09:12:32 +0000 Subject: [PATCH] deprecate GtkDestroyNotify. 2008-06-18 Michael Natterer * gtk/gtktypeutils.h: deprecate GtkDestroyNotify. * gtk/gtkactiongroup.[ch] * gtk/gtkcombobox.[ch] * gtk/gtkcontainer.[ch] * gtk/gtkliststore.[ch] * gtk/gtkmain.[ch] * gtk/gtkmenu.c * gtk/gtkstock.[ch] * gtk/gtktreedatalist.[ch] * gtk/gtktreemodelfilter.[ch] * gtk/gtktreemodelsort.[ch] * gtk/gtktreeprivate.h * gtk/gtktreeselection.[ch] * gtk/gtktreesortable.[ch] * gtk/gtktreestore.[ch] * gtk/gtktreeview.[ch] * gtk/gtktreeviewcolumn.[ch]: s/GtkDestroyNotify/GDestroyNotify/g. svn path=/trunk/; revision=20448 --- ChangeLog | 21 +++++++++++++++++++++ gtk/gtkactiongroup.c | 8 ++++---- gtk/gtkactiongroup.h | 2 +- gtk/gtkcombobox.c | 4 ++-- gtk/gtkcombobox.h | 2 +- gtk/gtkcontainer.c | 2 +- gtk/gtkcontainer.h | 2 +- gtk/gtkliststore.c | 12 ++++++------ gtk/gtkliststore.h | 2 +- gtk/gtkmain.c | 12 ++++++------ gtk/gtkmain.h | 8 ++++---- gtk/gtkmenu.c | 8 +++++--- gtk/gtkstock.c | 6 +++--- gtk/gtkstock.h | 2 +- gtk/gtktreedatalist.c | 6 +++--- gtk/gtktreedatalist.h | 4 ++-- gtk/gtktreemodelfilter.c | 12 ++++++------ gtk/gtktreemodelfilter.h | 4 ++-- gtk/gtktreemodelsort.c | 12 ++++++------ gtk/gtktreemodelsort.h | 2 +- gtk/gtktreeprivate.h | 8 ++++---- gtk/gtktreeselection.c | 6 +++--- gtk/gtktreeselection.h | 4 ++-- gtk/gtktreesortable.c | 4 ++-- gtk/gtktreesortable.h | 11 +++++------ gtk/gtktreestore.c | 12 ++++++------ gtk/gtktreestore.h | 2 +- gtk/gtktreeview.c | 14 +++++++------- gtk/gtktreeview.h | 8 ++++---- gtk/gtktreeviewcolumn.c | 6 +++--- gtk/gtktreeviewcolumn.h | 2 +- gtk/gtktypeutils.h | 2 +- 32 files changed, 116 insertions(+), 94 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04fe9677be..7ba0c21267 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2008-06-18 Michael Natterer + + * gtk/gtktypeutils.h: deprecate GtkDestroyNotify. + + * gtk/gtkactiongroup.[ch] + * gtk/gtkcombobox.[ch] + * gtk/gtkcontainer.[ch] + * gtk/gtkliststore.[ch] + * gtk/gtkmain.[ch] + * gtk/gtkmenu.c + * gtk/gtkstock.[ch] + * gtk/gtktreedatalist.[ch] + * gtk/gtktreemodelfilter.[ch] + * gtk/gtktreemodelsort.[ch] + * gtk/gtktreeprivate.h + * gtk/gtktreeselection.[ch] + * gtk/gtktreesortable.[ch] + * gtk/gtktreestore.[ch] + * gtk/gtktreeview.[ch] + * gtk/gtktreeviewcolumn.[ch]: s/GtkDestroyNotify/GDestroyNotify/g. + 2008-06-18 Michael Natterer * tests/testgtk.c: some more undeprecation. diff --git a/gtk/gtkactiongroup.c b/gtk/gtkactiongroup.c index 6bba6e75b4..f5eae00502 100644 --- a/gtk/gtkactiongroup.c +++ b/gtk/gtkactiongroup.c @@ -56,7 +56,7 @@ struct _GtkActionGroupPrivate GtkTranslateFunc translate_func; gpointer translate_data; - GtkDestroyNotify translate_notify; + GDestroyNotify translate_notify; }; enum @@ -1247,9 +1247,9 @@ gtk_action_group_add_radio_actions_full (GtkActionGroup *action_group * @action_group: a #GtkActionGroup * @func: a #GtkTranslateFunc * @data: data to be passed to @func and @notify - * @notify: a #GtkDestroyNotify function to be called when @action_group is + * @notify: a #GDestroyNotify function to be called when @action_group is * destroyed and when the translation function is changed again - * + * * Sets a function to be used for translating the @label and @tooltip of * #GtkActionGroupEntrys added by gtk_action_group_add_actions(). * @@ -1262,7 +1262,7 @@ void gtk_action_group_set_translate_func (GtkActionGroup *action_group, GtkTranslateFunc func, gpointer data, - GtkDestroyNotify notify) + GDestroyNotify notify) { g_return_if_fail (GTK_IS_ACTION_GROUP (action_group)); diff --git a/gtk/gtkactiongroup.h b/gtk/gtkactiongroup.h index 17067b939d..409c2b50fb 100644 --- a/gtk/gtkactiongroup.h +++ b/gtk/gtkactiongroup.h @@ -161,7 +161,7 @@ void gtk_action_group_add_radio_actions_full (GtkActionGroup void gtk_action_group_set_translate_func (GtkActionGroup *action_group, GtkTranslateFunc func, gpointer data, - GtkDestroyNotify notify); + GDestroyNotify notify); void gtk_action_group_set_translation_domain (GtkActionGroup *action_group, const gchar *domain); G_CONST_RETURN gchar *gtk_action_group_translate_string (GtkActionGroup *action_group, diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index a88747e908..b30226776c 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -123,7 +123,7 @@ struct _GtkComboBoxPrivate GtkTreeViewRowSeparatorFunc row_separator_func; gpointer row_separator_data; - GtkDestroyNotify row_separator_destroy; + GDestroyNotify row_separator_destroy; gchar *tearoff_title; }; @@ -5640,7 +5640,7 @@ void gtk_combo_box_set_row_separator_func (GtkComboBox *combo_box, GtkTreeViewRowSeparatorFunc func, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { g_return_if_fail (GTK_IS_COMBO_BOX (combo_box)); diff --git a/gtk/gtkcombobox.h b/gtk/gtkcombobox.h index cfead42d0d..8f5e1456e1 100644 --- a/gtk/gtkcombobox.h +++ b/gtk/gtkcombobox.h @@ -112,7 +112,7 @@ GtkTreeViewRowSeparatorFunc gtk_combo_box_get_row_separator_func (GtkComboBox void gtk_combo_box_set_row_separator_func (GtkComboBox *combo_box, GtkTreeViewRowSeparatorFunc func, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); /* convenience -- text */ GtkWidget *gtk_combo_box_new_text (void); diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index c81a372119..ea2cb6f9e4 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -1512,7 +1512,7 @@ gtk_container_foreach_full (GtkContainer *container, GtkCallback callback, GtkCallbackMarshal marshal, gpointer callback_data, - GtkDestroyNotify notify) + GDestroyNotify notify) { g_return_if_fail (GTK_IS_CONTAINER (container)); diff --git a/gtk/gtkcontainer.h b/gtk/gtkcontainer.h index 2154160895..5fd10d10f1 100644 --- a/gtk/gtkcontainer.h +++ b/gtk/gtkcontainer.h @@ -129,7 +129,7 @@ void gtk_container_foreach_full (GtkContainer *container, GtkCallback callback, GtkCallbackMarshal marshal, gpointer callback_data, - GtkDestroyNotify notify); + GDestroyNotify notify); #endif /* GTK_DISABLE_DEPRECATED */ GList* gtk_container_get_children (GtkContainer *container); diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c index f71836e1c3..4ae9922cf3 100644 --- a/gtk/gtkliststore.c +++ b/gtk/gtkliststore.c @@ -111,11 +111,11 @@ static void gtk_list_store_set_sort_func (GtkTreeSortable *so gint sort_column_id, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); static void gtk_list_store_set_default_sort_func (GtkTreeSortable *sortable, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); static gboolean gtk_list_store_has_default_sort_func (GtkTreeSortable *sortable); @@ -392,7 +392,7 @@ gtk_list_store_finalize (GObject *object) if (list_store->default_sort_destroy) { - GtkDestroyNotify d = list_store->default_sort_destroy; + GDestroyNotify d = list_store->default_sort_destroy; list_store->default_sort_destroy = NULL; d (list_store->default_sort_data); @@ -1831,7 +1831,7 @@ gtk_list_store_set_sort_func (GtkTreeSortable *sortable, gint sort_column_id, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { GtkListStore *list_store = (GtkListStore *) sortable; @@ -1847,13 +1847,13 @@ static void gtk_list_store_set_default_sort_func (GtkTreeSortable *sortable, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { GtkListStore *list_store = (GtkListStore *) sortable; if (list_store->default_sort_destroy) { - GtkDestroyNotify d = list_store->default_sort_destroy; + GDestroyNotify d = list_store->default_sort_destroy; list_store->default_sort_destroy = NULL; d (list_store->default_sort_data); diff --git a/gtk/gtkliststore.h b/gtk/gtkliststore.h index 656805a99a..8f06b2d5af 100644 --- a/gtk/gtkliststore.h +++ b/gtk/gtkliststore.h @@ -57,7 +57,7 @@ struct _GtkListStore gint length; GtkTreeIterCompareFunc default_sort_func; gpointer default_sort_data; - GtkDestroyNotify default_sort_destroy; + GDestroyNotify default_sort_destroy; guint columns_dirty : 1; }; diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 3b1e0b1c4b..e1c37b6708 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -127,14 +127,14 @@ struct _GtkQuitFunction GtkCallbackMarshal marshal; GtkFunction function; gpointer data; - GtkDestroyNotify destroy; + GDestroyNotify destroy; }; struct _GtkClosure { GtkCallbackMarshal marshal; gpointer data; - GtkDestroyNotify destroy; + GDestroyNotify destroy; }; struct _GtkKeySnooperData @@ -1867,7 +1867,7 @@ gtk_quit_add_full (guint main_level, GtkFunction function, GtkCallbackMarshal marshal, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { static guint quit_id = 1; GtkQuitFunction *quitf; @@ -1985,7 +1985,7 @@ gtk_timeout_add_full (guint32 interval, GtkFunction function, GtkCallbackMarshal marshal, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { if (marshal) { @@ -2024,7 +2024,7 @@ gtk_idle_add_full (gint priority, GtkFunction function, GtkCallbackMarshal marshal, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { if (marshal) { @@ -2078,7 +2078,7 @@ gtk_input_add_full (gint source, GdkInputFunction function, GtkCallbackMarshal marshal, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { if (marshal) { diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h index 5529d7696f..975057e864 100644 --- a/gtk/gtkmain.h +++ b/gtk/gtkmain.h @@ -167,7 +167,7 @@ guint gtk_quit_add_full (guint main_level, GtkFunction function, GtkCallbackMarshal marshal, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); void gtk_quit_remove (guint quit_handler_id); void gtk_quit_remove_by_data (gpointer data); #ifndef GTK_DISABLE_DEPRECATED @@ -178,7 +178,7 @@ guint gtk_timeout_add_full (guint32 interval, GtkFunction function, GtkCallbackMarshal marshal, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); void gtk_timeout_remove (guint timeout_handler_id); guint gtk_idle_add (GtkFunction function, @@ -190,7 +190,7 @@ guint gtk_idle_add_full (gint priority, GtkFunction function, GtkCallbackMarshal marshal, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); void gtk_idle_remove (guint idle_handler_id); void gtk_idle_remove_by_data (gpointer data); guint gtk_input_add_full (gint source, @@ -198,7 +198,7 @@ guint gtk_input_add_full (gint source, GdkInputFunction function, GtkCallbackMarshal marshal, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); void gtk_input_remove (guint input_handler_id); #endif /* GTK_DISABLE_DEPRECATED */ diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index 75fad41251..8ea3ba866a 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -1033,8 +1033,9 @@ gtk_menu_attach_to_widget (GtkMenu *menu, { list = g_list_prepend (list, menu); } - g_object_set_data_full (G_OBJECT (attach_widget), I_(ATTACHED_MENUS), list, (GtkDestroyNotify) g_list_free); - + g_object_set_data_full (G_OBJECT (attach_widget), I_(ATTACHED_MENUS), list, + (GDestroyNotify) g_list_free); + if (GTK_WIDGET_STATE (menu) != GTK_STATE_NORMAL) gtk_widget_set_state (GTK_WIDGET (menu), GTK_STATE_NORMAL); @@ -1086,7 +1087,8 @@ gtk_menu_detach (GtkMenu *menu) list = g_object_steal_data (G_OBJECT (data->attach_widget), ATTACHED_MENUS); list = g_list_remove (list, menu); if (list) - g_object_set_data_full (G_OBJECT (data->attach_widget), I_(ATTACHED_MENUS), list, (GtkDestroyNotify) g_list_free); + g_object_set_data_full (G_OBJECT (data->attach_widget), I_(ATTACHED_MENUS), list, + (GDestroyNotify) g_list_free); else g_object_set_data (G_OBJECT (data->attach_widget), I_(ATTACHED_MENUS), NULL); diff --git a/gtk/gtkstock.c b/gtk/gtkstock.c index 76f10fc4b1..35698ca289 100644 --- a/gtk/gtkstock.c +++ b/gtk/gtkstock.c @@ -47,7 +47,7 @@ struct _GtkStockTranslateFunc { GtkTranslateFunc func; gpointer data; - GtkDestroyNotify notify; + GDestroyNotify notify; }; static void @@ -410,7 +410,7 @@ static const GtkStockItem builtin_items [] = * @domain: the translation domain for which @func shall be used * @func: a #GtkTranslateFunc * @data: data to pass to @func - * @notify: a #GtkDestroyNotify that is called when @data is + * @notify: a #GDestroyNotify that is called when @data is * no longer needed * * Sets a function to be used for translating the @label of @@ -426,7 +426,7 @@ void gtk_stock_set_translate_func (const gchar *domain, GtkTranslateFunc func, gpointer data, - GtkDestroyNotify notify) + GDestroyNotify notify) { GtkStockTranslateFunc *translate; gchar *domainname; diff --git a/gtk/gtkstock.h b/gtk/gtkstock.h index 80ec1ec9d7..f259d89dec 100644 --- a/gtk/gtkstock.h +++ b/gtk/gtkstock.h @@ -66,7 +66,7 @@ void gtk_stock_item_free (GtkStockItem *item); void gtk_stock_set_translate_func (const gchar *domain, GtkTranslateFunc func, gpointer data, - GtkDestroyNotify notify); + GDestroyNotify notify); /* Stock IDs (not all are stock items; some are images only) */ #define GTK_STOCK_DIALOG_AUTHENTICATION \ diff --git a/gtk/gtktreedatalist.c b/gtk/gtktreedatalist.c index 8643b79cc4..5c709430e9 100644 --- a/gtk/gtktreedatalist.c +++ b/gtk/gtktreedatalist.c @@ -483,7 +483,7 @@ _gtk_tree_data_list_header_free (GList *list) if (header->destroy) { - GtkDestroyNotify d = header->destroy; + GDestroyNotify d = header->destroy; header->destroy = NULL; d (header->data); @@ -515,7 +515,7 @@ _gtk_tree_data_list_set_header (GList *header_list, gint sort_column_id, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { GList *list = header_list; GtkTreeDataSortHeader *header = NULL; @@ -543,7 +543,7 @@ _gtk_tree_data_list_set_header (GList *header_list, if (header->destroy) { - GtkDestroyNotify d = header->destroy; + GDestroyNotify d = header->destroy; header->destroy = NULL; d (header->data); diff --git a/gtk/gtktreedatalist.h b/gtk/gtktreedatalist.h index bd1928d789..cfd81b57d5 100644 --- a/gtk/gtktreedatalist.h +++ b/gtk/gtktreedatalist.h @@ -47,7 +47,7 @@ typedef struct _GtkTreeDataSortHeader gint sort_column_id; GtkTreeIterCompareFunc func; gpointer data; - GtkDestroyNotify destroy; + GDestroyNotify destroy; } GtkTreeDataSortHeader; GtkTreeDataList *_gtk_tree_data_list_alloc (void); @@ -77,6 +77,6 @@ GList *_gtk_tree_data_list_set_header (GList * gint sort_column_id, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); #endif /* __GTK_TREE_DATA_LIST_H__ */ diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c index 7a4aa69314..8e6da2c836 100644 --- a/gtk/gtktreemodelfilter.c +++ b/gtk/gtktreemodelfilter.c @@ -91,13 +91,13 @@ struct _GtkTreeModelFilterPrivate GtkTreeModelFilterVisibleFunc visible_func; gpointer visible_data; - GtkDestroyNotify visible_destroy; + GDestroyNotify visible_destroy; gint modify_n_columns; GType *modify_types; GtkTreeModelFilterModifyFunc modify_func; gpointer modify_data; - GtkDestroyNotify modify_destroy; + GDestroyNotify modify_destroy; gint visible_column; @@ -2890,7 +2890,7 @@ void gtk_tree_model_filter_set_visible_func (GtkTreeModelFilter *filter, GtkTreeModelFilterVisibleFunc func, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { g_return_if_fail (GTK_IS_TREE_MODEL_FILTER (filter)); g_return_if_fail (func != NULL); @@ -2898,7 +2898,7 @@ gtk_tree_model_filter_set_visible_func (GtkTreeModelFilter *filter, if (filter->priv->visible_func) { - GtkDestroyNotify d = filter->priv->visible_destroy; + GDestroyNotify d = filter->priv->visible_destroy; filter->priv->visible_destroy = NULL; d (filter->priv->visible_data); @@ -2936,7 +2936,7 @@ gtk_tree_model_filter_set_modify_func (GtkTreeModelFilter *filter, GType *types, GtkTreeModelFilterModifyFunc func, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { g_return_if_fail (GTK_IS_TREE_MODEL_FILTER (filter)); g_return_if_fail (func != NULL); @@ -2944,7 +2944,7 @@ gtk_tree_model_filter_set_modify_func (GtkTreeModelFilter *filter, if (filter->priv->modify_destroy) { - GtkDestroyNotify d = filter->priv->modify_destroy; + GDestroyNotify d = filter->priv->modify_destroy; filter->priv->modify_destroy = NULL; d (filter->priv->modify_data); diff --git a/gtk/gtktreemodelfilter.h b/gtk/gtktreemodelfilter.h index 43d3e06127..5c06775709 100644 --- a/gtk/gtktreemodelfilter.h +++ b/gtk/gtktreemodelfilter.h @@ -75,13 +75,13 @@ GtkTreeModel *gtk_tree_model_filter_new (GtkTreeModel void gtk_tree_model_filter_set_visible_func (GtkTreeModelFilter *filter, GtkTreeModelFilterVisibleFunc func, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); void gtk_tree_model_filter_set_modify_func (GtkTreeModelFilter *filter, gint n_columns, GType *types, GtkTreeModelFilterModifyFunc func, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); void gtk_tree_model_filter_set_visible_column (GtkTreeModelFilter *filter, gint column); diff --git a/gtk/gtktreemodelsort.c b/gtk/gtktreemodelsort.c index 8e90126fe1..743e058ce6 100644 --- a/gtk/gtktreemodelsort.c +++ b/gtk/gtktreemodelsort.c @@ -201,11 +201,11 @@ static void gtk_tree_model_sort_set_sort_func (GtkTreeSortable gint sort_column_id, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); static void gtk_tree_model_sort_set_default_sort_func (GtkTreeSortable *sortable, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); static gboolean gtk_tree_model_sort_has_default_sort_func (GtkTreeSortable *sortable); /* Private functions (sort funcs, level handling and other utils) */ @@ -1356,7 +1356,7 @@ gtk_tree_model_sort_set_sort_func (GtkTreeSortable *sortable, gint sort_column_id, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *) sortable; @@ -1372,13 +1372,13 @@ static void gtk_tree_model_sort_set_default_sort_func (GtkTreeSortable *sortable, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *)sortable; if (tree_model_sort->default_sort_destroy) { - GtkDestroyNotify d = tree_model_sort->default_sort_destroy; + GDestroyNotify d = tree_model_sort->default_sort_destroy; tree_model_sort->default_sort_destroy = NULL; d (tree_model_sort->default_sort_data); @@ -2398,7 +2398,7 @@ gtk_tree_model_sort_reset_default_sort_func (GtkTreeModelSort *tree_model_sort) if (tree_model_sort->default_sort_destroy) { - GtkDestroyNotify d = tree_model_sort->default_sort_destroy; + GDestroyNotify d = tree_model_sort->default_sort_destroy; tree_model_sort->default_sort_destroy = NULL; d (tree_model_sort->default_sort_data); diff --git a/gtk/gtktreemodelsort.h b/gtk/gtktreemodelsort.h index d053f86ea6..64b7acfad6 100644 --- a/gtk/gtktreemodelsort.h +++ b/gtk/gtktreemodelsort.h @@ -58,7 +58,7 @@ struct _GtkTreeModelSort /* default sort */ GtkTreeIterCompareFunc default_sort_func; gpointer default_sort_data; - GtkDestroyNotify default_sort_destroy; + GDestroyNotify default_sort_destroy; /* signal ids */ guint changed_id; diff --git a/gtk/gtktreeprivate.h b/gtk/gtktreeprivate.h index 7fe4d0ced9..51bb9511f8 100644 --- a/gtk/gtktreeprivate.h +++ b/gtk/gtktreeprivate.h @@ -159,14 +159,14 @@ struct _GtkTreeViewPrivate GtkTreeViewColumnDropFunc column_drop_func; gpointer column_drop_func_data; - GtkDestroyNotify column_drop_func_data_destroy; + GDestroyNotify column_drop_func_data_destroy; GList *column_drag_info; GtkTreeViewColumnReorder *cur_reorder; /* ATK Hack */ GtkTreeDestroyCountFunc destroy_count_func; gpointer destroy_count_data; - GtkDestroyNotify destroy_count_destroy; + GDestroyNotify destroy_count_destroy; /* Scroll timeout (e.g. during dnd) */ guint scroll_timeout; @@ -245,7 +245,7 @@ struct _GtkTreeViewPrivate GtkTreeViewSearchPositionFunc search_position_func; GtkTreeViewSearchEqualFunc search_equal_func; gpointer search_user_data; - GtkDestroyNotify search_destroy; + GDestroyNotify search_destroy; gpointer search_position_user_data; GDestroyNotify search_position_destroy; GtkWidget *search_window; @@ -257,7 +257,7 @@ struct _GtkTreeViewPrivate GtkTreeViewRowSeparatorFunc row_separator_func; gpointer row_separator_data; - GtkDestroyNotify row_separator_destroy; + GDestroyNotify row_separator_destroy; gint level_indentation; diff --git a/gtk/gtktreeselection.c b/gtk/gtktreeselection.c index 75889851c6..130c14d658 100644 --- a/gtk/gtktreeselection.c +++ b/gtk/gtktreeselection.c @@ -77,7 +77,7 @@ gtk_tree_selection_finalize (GObject *object) if (selection->destroy) { - GtkDestroyNotify d = selection->destroy; + GDestroyNotify d = selection->destroy; selection->destroy = NULL; d (selection->user_data); @@ -256,14 +256,14 @@ void gtk_tree_selection_set_select_function (GtkTreeSelection *selection, GtkTreeSelectionFunc func, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { g_return_if_fail (GTK_IS_TREE_SELECTION (selection)); g_return_if_fail (func != NULL); if (selection->destroy) { - GtkDestroyNotify d = selection->destroy; + GDestroyNotify d = selection->destroy; selection->destroy = NULL; d (selection->user_data); diff --git a/gtk/gtktreeselection.h b/gtk/gtktreeselection.h index eb19aa5383..6036dfc9d2 100644 --- a/gtk/gtktreeselection.h +++ b/gtk/gtktreeselection.h @@ -58,7 +58,7 @@ struct _GtkTreeSelection GtkSelectionMode type; GtkTreeSelectionFunc user_func; gpointer user_data; - GtkDestroyNotify destroy; + GDestroyNotify destroy; }; struct _GtkTreeSelectionClass @@ -83,7 +83,7 @@ GtkSelectionMode gtk_tree_selection_get_mode (GtkTreeSelection void gtk_tree_selection_set_select_function (GtkTreeSelection *selection, GtkTreeSelectionFunc func, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); gpointer gtk_tree_selection_get_user_data (GtkTreeSelection *selection); GtkTreeView* gtk_tree_selection_get_tree_view (GtkTreeSelection *selection); diff --git a/gtk/gtktreesortable.c b/gtk/gtktreesortable.c index 1987d77972..cabaf5badd 100644 --- a/gtk/gtktreesortable.c +++ b/gtk/gtktreesortable.c @@ -165,7 +165,7 @@ gtk_tree_sortable_set_sort_func (GtkTreeSortable *sortable, gint sort_column_id, GtkTreeIterCompareFunc sort_func, gpointer user_data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { GtkTreeSortableIface *iface; @@ -202,7 +202,7 @@ void gtk_tree_sortable_set_default_sort_func (GtkTreeSortable *sortable, GtkTreeIterCompareFunc sort_func, gpointer user_data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { GtkTreeSortableIface *iface; diff --git a/gtk/gtktreesortable.h b/gtk/gtktreesortable.h index ca9311fa1b..17e7f940b8 100644 --- a/gtk/gtktreesortable.h +++ b/gtk/gtktreesortable.h @@ -68,11 +68,11 @@ struct _GtkTreeSortableIface gint sort_column_id, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); void (* set_default_sort_func) (GtkTreeSortable *sortable, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); gboolean (* has_default_sort_func) (GtkTreeSortable *sortable); }; @@ -90,14 +90,13 @@ void gtk_tree_sortable_set_sort_func (GtkTreeSortable *sortab gint sort_column_id, GtkTreeIterCompareFunc sort_func, gpointer user_data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); void gtk_tree_sortable_set_default_sort_func (GtkTreeSortable *sortable, GtkTreeIterCompareFunc sort_func, gpointer user_data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); gboolean gtk_tree_sortable_has_default_sort_func (GtkTreeSortable *sortable); - - + G_END_DECLS #endif /* __GTK_TREE_SORTABLE_H__ */ diff --git a/gtk/gtktreestore.c b/gtk/gtktreestore.c index e74259b579..dcacbbbec3 100644 --- a/gtk/gtktreestore.c +++ b/gtk/gtktreestore.c @@ -110,11 +110,11 @@ static void gtk_tree_store_set_sort_func (GtkTreeSortable * gint sort_column_id, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); static void gtk_tree_store_set_default_sort_func (GtkTreeSortable *sortable, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); static gboolean gtk_tree_store_has_default_sort_func (GtkTreeSortable *sortable); @@ -431,7 +431,7 @@ gtk_tree_store_finalize (GObject *object) if (tree_store->default_sort_destroy) { - GtkDestroyNotify d = tree_store->default_sort_destroy; + GDestroyNotify d = tree_store->default_sort_destroy; tree_store->default_sort_destroy = NULL; d (tree_store->default_sort_data); @@ -3139,7 +3139,7 @@ gtk_tree_store_set_sort_func (GtkTreeSortable *sortable, gint sort_column_id, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { GtkTreeStore *tree_store = (GtkTreeStore *) sortable; @@ -3155,13 +3155,13 @@ static void gtk_tree_store_set_default_sort_func (GtkTreeSortable *sortable, GtkTreeIterCompareFunc func, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { GtkTreeStore *tree_store = (GtkTreeStore *) sortable; if (tree_store->default_sort_destroy) { - GtkDestroyNotify d = tree_store->default_sort_destroy; + GDestroyNotify d = tree_store->default_sort_destroy; tree_store->default_sort_destroy = NULL; d (tree_store->default_sort_data); diff --git a/gtk/gtktreestore.h b/gtk/gtktreestore.h index 7eb2711483..57de364cae 100644 --- a/gtk/gtktreestore.h +++ b/gtk/gtktreestore.h @@ -56,7 +56,7 @@ struct _GtkTreeStore GType *column_headers; GtkTreeIterCompareFunc default_sort_func; gpointer default_sort_data; - GtkDestroyNotify default_sort_destroy; + GDestroyNotify default_sort_destroy; guint columns_dirty : 1; }; diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index f2deab2320..ab28e6bb95 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -11496,7 +11496,7 @@ void gtk_tree_view_set_column_drag_function (GtkTreeView *tree_view, GtkTreeViewColumnDropFunc func, gpointer user_data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); @@ -13779,7 +13779,7 @@ void gtk_tree_view_set_destroy_count_func (GtkTreeView *tree_view, GtkTreeDestroyCountFunc func, gpointer data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); @@ -13917,7 +13917,7 @@ void gtk_tree_view_set_search_equal_func (GtkTreeView *tree_view, GtkTreeViewSearchEqualFunc search_equal_func, gpointer search_user_data, - GtkDestroyNotify search_destroy) + GDestroyNotify search_destroy) { g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); g_return_if_fail (search_equal_func != NULL); @@ -14982,10 +14982,10 @@ gtk_tree_view_get_row_separator_func (GtkTreeView *tree_view) * Since: 2.6 **/ void -gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view, - GtkTreeViewRowSeparatorFunc func, - gpointer data, - GtkDestroyNotify destroy) +gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view, + GtkTreeViewRowSeparatorFunc func, + gpointer data, + GDestroyNotify destroy) { g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); diff --git a/gtk/gtktreeview.h b/gtk/gtktreeview.h index 9a39299ce1..e34856a13b 100644 --- a/gtk/gtktreeview.h +++ b/gtk/gtktreeview.h @@ -197,7 +197,7 @@ GtkTreeViewColumn *gtk_tree_view_get_expander_column (GtkTreeView void gtk_tree_view_set_column_drag_function (GtkTreeView *tree_view, GtkTreeViewColumnDropFunc func, gpointer user_data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); /* Actions */ void gtk_tree_view_scroll_to_point (GtkTreeView *tree_view, @@ -319,7 +319,7 @@ GtkTreeViewSearchEqualFunc gtk_tree_view_get_search_equal_func (GtkTreeView void gtk_tree_view_set_search_equal_func (GtkTreeView *tree_view, GtkTreeViewSearchEqualFunc search_equal_func, gpointer search_user_data, - GtkDestroyNotify search_destroy); + GDestroyNotify search_destroy); GtkEntry *gtk_tree_view_get_search_entry (GtkTreeView *tree_view); void gtk_tree_view_set_search_entry (GtkTreeView *tree_view, @@ -371,7 +371,7 @@ typedef void (* GtkTreeDestroyCountFunc) (GtkTreeView *tree_view, void gtk_tree_view_set_destroy_count_func (GtkTreeView *tree_view, GtkTreeDestroyCountFunc func, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); void gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view, gboolean enable); @@ -392,7 +392,7 @@ GtkTreeViewRowSeparatorFunc gtk_tree_view_get_row_separator_func (GtkTreeView void gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view, GtkTreeViewRowSeparatorFunc func, gpointer data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); GtkTreeViewGridLines gtk_tree_view_get_grid_lines (GtkTreeView *tree_view); void gtk_tree_view_set_grid_lines (GtkTreeView *tree_view, diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index bd781066db..edb415c59d 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -67,7 +67,7 @@ struct _GtkTreeViewColumnCellInfo GSList *attributes; GtkTreeCellDataFunc func; gpointer func_data; - GtkDestroyNotify destroy; + GDestroyNotify destroy; gint requested_width; gint real_width; guint expand : 1; @@ -391,7 +391,7 @@ gtk_tree_view_column_finalize (GObject *object) if (info->destroy) { - GtkDestroyNotify d = info->destroy; + GDestroyNotify d = info->destroy; info->destroy = NULL; d (info->func_data); @@ -1663,7 +1663,7 @@ gtk_tree_view_column_set_cell_data_func (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer, GtkTreeCellDataFunc func, gpointer func_data, - GtkDestroyNotify destroy) + GDestroyNotify destroy) { gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (tree_column), cell_renderer, diff --git a/gtk/gtktreeviewcolumn.h b/gtk/gtktreeviewcolumn.h index 6419558950..3337fc3d04 100644 --- a/gtk/gtktreeviewcolumn.h +++ b/gtk/gtktreeviewcolumn.h @@ -148,7 +148,7 @@ void gtk_tree_view_column_set_cell_data_func (GtkTreeViewCol GtkCellRenderer *cell_renderer, GtkTreeCellDataFunc func, gpointer func_data, - GtkDestroyNotify destroy); + GDestroyNotify destroy); void gtk_tree_view_column_clear_attributes (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer); void gtk_tree_view_column_set_spacing (GtkTreeViewColumn *tree_column, diff --git a/gtk/gtktypeutils.h b/gtk/gtktypeutils.h index 71a675616c..0335071317 100644 --- a/gtk/gtktypeutils.h +++ b/gtk/gtktypeutils.h @@ -115,7 +115,6 @@ GType gtk_identifier_get_type (void) G_GNUC_CONST; typedef struct _GtkArg GtkArg; typedef struct _GtkObject GtkObject; /* object forward declaration */ typedef gboolean (*GtkFunction) (gpointer data); -typedef void (*GtkDestroyNotify) (gpointer data); typedef void (*GtkCallbackMarshal) (GtkObject *object, gpointer data, guint n_args, @@ -123,6 +122,7 @@ typedef void (*GtkCallbackMarshal) (GtkObject *object, #ifndef GTK_DISABLE_DEPRECATED +typedef void (*GtkDestroyNotify) (gpointer data); typedef void (*GtkSignalFunc) (void); #endif /* GTK_DISABLE_DEPRECATED */ -- 2.30.2